#!/user/bin/env python3
# -*- coding: utf-8 -*-
"""
--------------------------------------
    Author:     JiChao_Song
    Data  :     2020/5/8 下午3:35
--------------------------------------
"""

import requests
from config.setting import API_URL


class Requests:

    def __init__(self, url):
        self .url = API_URL+url

    def Post(self, data, headers=None, **kwargs):

        response = requests.post(url=self.url, data=data, headers=headers)

        return response

    def Get(self, params=None, headers=None, **kwargs):

        response = requests.get(url=self.url, params=params, headers=headers)

        return response
